import Mock from 'mockjs'
const list = Mock.mock({
  'list|10': [
    {
      guideImageId: '@id',
      guideImageName: '@ctitle(3,5)',
      guideImageDesc: '@string(5)',
      'guideImageType|1': [1, 2, 3],
      'releaseStatus|1': [1, 0],
      guideImageTime: '@integer(0, 20)',
      createTime: '@datetime'
    }
  ]
})
const dictMap = {
  guideImageType: {
    1: '11',
    2: '22',
    3: '33'
  }
}
const pub = {
  isMore: 0,
  pageIndex: 1,
  pageSize: 10,
  startIndex: 0,
  totalNum: 1,
  totalPage: 1
}
export default [
  // 分页查询引导图集合
  {
    url: '/general/guide/image/getGuideImageListPage',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {
          ...list,
          ...pub
        },
        dictMap,
        msg: ''
      }
    }
  },
  // 根据id获取详情
  {
    url: '/general/guide/image/getGuideImage',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {
          ...list.list[0]
        },
        dictMap,
        msg: ''
      }
    }
  },
  // 删除引导图
  {
    url: '/general/guide/image/removeGuideImage',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {},
        dictMap,
        msg: ''
      }
    }
  }
]
